using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.SubTaskBaks
{
    public class RoleInfoConfig : IEntityTypeConfiguration<SubTaskBak>
    {
        public void Configure(EntityTypeBuilder<SubTaskBak> builder)
        {
            builder.HasComment("子任务备份表");
            builder.Property(x => x.TaskFrom).IsRequired().HasMaxLength(30).HasComment("发送方：WMS\\WCS");
            builder.Property(x => x.SubTaskId).HasMaxLength(30).HasComment("子任务Id");
            builder.Property(x => x.SubTaskType).IsRequired().HasMaxLength(30).HasComment("子任务类型");
            builder.Property(x => x.UnitId).IsRequired().HasMaxLength(30).HasComment("条码号");
            builder.Property(x => x.FromLoc).IsRequired().HasMaxLength(30).HasComment("起点");
            builder.Property(x => x.ToLoc).IsRequired().HasMaxLength(30).HasComment("终点");
            //builder.Property(x => x.MainTaskId).IsRequired().HasComment("主任务id");
            builder.Property(x => x.TaskSeq).IsRequired().HasComment("任务序列：1.2.3…");
            builder.Property(x => x.TaskStatus).IsRequired().HasMaxLength(30).HasComment("任务状态");
            builder.Property(x => x.SendTime).HasDefaultValue().HasComment("任务下发时间");
            builder.Property(x => x.StartTime).HasDefaultValue().HasComment("开始时间");
            builder.Property(x => x.CompleteTime).HasDefaultValue().HasComment("完成时间");
            builder.Property(x => x.IsNeedSection).HasComment("是否分段");
            builder.Property(x => x.HandOffShelf).HasDefaultValue("").HasComment("中转储位");
        }
    }
}